<div class="x_panel">
    <ul class="breadcrumb">
        <li><span class="primary-font"><i class="icon-home"></i></span><a href="index.html"> Home</a></li>
        <li>角色</li>
        <li>设置菜单</li>
    </ul>
    <div class="smart-widget">
        <div class="smart-widget-header">
            设置菜单
        </div>
        <div class="smart-widget-inner">
            <div class="smart-widget-body">
                <div class="row">
                    <div class="padding-md">
                        <form id="roleAddForm" method="post" class="form-horizontal  form-label-left"
                              action="target.php">
                            <div class="form-group">
                                <ul id="tree" class="ztree" style="width:230px; overflow:auto;"></ul>
                            </div>
                            <div class="form-group pull-right">
                                <button type="submit"  id="validateBtn" class="btn btn-primary">保存</button>\
                                <button id="back" onclick="backToList()" class="btn btn-success" type="button">返回</button>
                            </div>
                        </form>
                    </div>
                </div><!-- ./row -->
            </div>
        </div><!-- ./smart-widget-inner -->
    </div><!-- ./smart-widget -->
</div>
<script>

    function backToList() {
        $.goTo('role/roleList.html')
    }
    var zTreeObj,
        setting = {
            view: {
                selectedMulti: false
            },
            check: {
                enable: true
            },
            data: {
                simpleData: {
                    enable: true
                }
            }
        },
        zTreeNodes = [
            {"name":"网站导航", open:true, children: [
                { "name":"google", "url":"http://g.cn", "target":"_blank"},
                { "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
                { "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
            ]
            },
            {"name":"网站导航", open:true, children: [
                { "name":"google", "url":"http://g.cn", "target":"_blank"},
                { "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
                { "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
            ]
            },
            {"name":"网站导航", open:true, children: [
                { "name":"google", "url":"http://g.cn", "target":"_blank"},
                { "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
                { "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
            ]
            }
        ];

    $(document).ready(function(){
        zTreeObj = $.fn.zTree.init($("#tree"), setting, zTreeNodes);

    });
</script>
<script type="text/javascript" th:inline="javascript">

    /*<![CDATA[*/



    /*]]>*/
</script>